package com.qintian.rainstorm.modules.Controller;

import com.qintian.rainstorm.modules.sever.RqcServer;
import com.qintian.rainstorm.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chz
 * @Date: 2019/1/3 15:55
 * @Describe:
 */
@RestController
@CrossOrigin
@RequestMapping(value = "/rqc")
public class RqcController {

    @Autowired
    RqcServer rqcServer;

    /**
     * 获取当天青田异常站点
     *
     * @param time 日期  格式 20190101120000
     * @return
     */
    @CrossOrigin
    @RequestMapping("/getRqcStation")
    public R getRqcStation(String time) {
        return R.ok().put("DS", rqcServer.getRqcStation(time));
    }
}
